package com.wind.utils;

import com.wind.beans.ArticleListBean;
import com.wind.beans.DiaryBean;
import com.wind.beans.LogoutBean;
import com.wind.beans.itemBean;
import com.wind.beans.picManagerBean;
import com.wind.beans.tokenBean;
import com.wind.soblogin.LoginBody;
import com.wind.soblogin.SobUser;

import retrofit2.Call;
import retrofit2.http.Body;
import retrofit2.http.GET;
import retrofit2.http.POST;
import retrofit2.http.Path;

/**
 * Create by os on 2021/12/6
 * Desc : 接口
 */
public interface ApiServer {
    /**
     * 登录接口
     * @param verifyCode 验证码
     * @param user       账号信息
     * @return
     */

//    http://lolxiaoguo.cn:2020/user/login/94754/
//    /user/login/' + verifyCode + '/' + '?from=p_'
    @POST("/user/login/{captcha}/?from=p_")
    Call<SobUser> doLogin(@Path("captcha") String verifyCode, @Body LoginBody user);

    //http://lolxiaoguo.cn:2020/admin/category/list
    @GET("/admin/category/list")
    Call<itemBean> getCategoryList();



    //"https://lolxiaoguo.cn/user/captcha";
    @GET("/user/captcha")
    void getCaptcha();



    //http://lolxiaoguo.cn:2020/admin/image/list/1/2
    @GET("/admin/image/list/1/20")
    Call<picManagerBean> getPicList();




    //http://lolxiaoguo.cn:2020/user/check-token
    @GET("/user/check-token")
    Call<tokenBean> checkToken();

    //http://lolxiaoguo.cn:2020/portal/diary/list/1/10
    //TODO:这里的接口还要考虑分页设计
    @GET("/portal/diary/list/1/100")
    Call<DiaryBean> getDiaryList();


    //TODO:这里的接口还要考虑分页设计
    @GET("/portal/article/list/1/100")
    Call<ArticleListBean> getArticleList();


    //http://lolxiaoguo.cn:2020/user/logout
    @GET("/user/logout")
    Call<LogoutBean> Logout();
}
